package cn.jsl.pet.domain;

import cn.jsl.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author jijie
 * @since 2022-06-15
 */
@Data
public class PetType extends BaseDomain{



    private String name;
    private String description;
    private String dirPath;
    /**
     * 父类型id
     */
    private Long pid;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)//避免空指针
    private List<PetType> children = new ArrayList<>();


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    @Override
    public String toString() {
        return "PetType{" +
        ", name=" + name +
        ", description=" + description +
        ", pid=" + pid +
        "}";
    }
}
